Quantizer for lossless &amp; near-lossless compression

ABSTRACT

A system includes code configured to cause a processor to obtain a video bitstream, the video bitstream including: a first quantization index value for a coefficient of a coded image; an offset value; a quantization step size that corresponds to the first quantization index value; a second quantization index value for another coefficient of the coded image, the second quantization index value being based on both the first quantization index value and the offset value and being greater than or equal to a predetermined threshold value; and a mode indicating whether the coded image is to be decoded in a lossy mode or a lossless mode, the mode being determined based on whether the first quantization index value is equal to a quantization index value associated with lossless coding, and whether the offset value is less than or equal to the quantization index value associated with the lossless coding.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.17/828,728, filed May 31, 2022, which is a continuation of U.S.application Ser. No. 17/243,132, filed on Apr. 28, 2021, now U.S. Pat.No. 11,381,821, patented on Jul. 5, 2022, which is a continuationapplication of U.S. patent application Ser. No. 17/065,974, filed onOct. 8, 2020, now U.S. Pat. No. 11,032,546, patented on Jun. 8, 2021,which claims priority from U.S. Provisional Application No. 63/054,049,filed on Jul. 20, 2020, the disclosures of which are incorporated hereinby reference in their entireties.

FIELD

Embodiments of the present disclosure are directed to a set of advancedvideo coding technologies, and more particularly to quantizer technologyfor dealing with lossless/near-lossless compression.

BACKGROUND

AOMedia Video 1 (AV1) was developed as a successor to VP9 by theAlliance for Open Media (AOMedia), a consortium founded in 2015 thatincludes semiconductor firms, video on demand providers, video contentproducers, software development companies and web browser vendors. Manyof the components of the AV1 project were sourced from previous researchefforts by Alliance members. Individual contributors startedexperimental technology platforms years before: Xiph's/Mozilla's Daalapublished code in 2010, Google's experimental VP9 evolution project VP10was announced on Sep. 12, 2014, and Cisco's Thor was published on Aug.11, 2015. Building on the codebase of VP9, AV1 incorporates additionaltechniques, several of which were developed in these experimentalformats. The first version, version 0.1.0, of the AV1 reference codecwas published on Apr. 7, 2016. The Alliance announced the release of theAV1 bitstream specification on Mar. 28, 2018, along with a referencesoftware-based encoder and decoder. On Jun. 25, 2018, a validatedversion 1.0.0 of the specification was released. On Jan. 8, 2019, “AV1Bitstream & Decoding Process Specification” was released, which is avalidated version 1.0.0 with Errata 1 of the specification. The AV1bitstream specification includes a reference video codec. The“AV1Bitstream & Decoding Process Specification” (Version 1.0.0 with Errata1), The Alliance for Open Media (Jan. 8, 2019), is incorporated hereinin its entirety by reference. AOMedia Video 2 (AV2) is currently underdevelopment and 8-bit/10-bit transform cores are designed for it.

SUMMARY

According to embodiments, a system is provided. The system includes: atleast one memory configured to store computer program code; and at leastone processor configured to access the computer program code and operateas instructed by the computer program code, the computer program codeconfigured to cause the at least one processor to obtain a videobitstream. The video bitstream including: a first quantization indexvalue for a coefficient of a coded image; an offset value; aquantization step size that corresponds to the first quantization indexvalue; a second quantization index value for another coefficient of thecoded image, the second quantization index value being based on both (1)the first quantization index value and (2) the offset value and beinggreater than or equal to a predetermined threshold value; and a modeindicating whether the coded image is to be decoded in a lossy mode or alossless mode, the mode being determined based on (1) whether the firstquantization index value is equal to a quantization index valueassociated with lossless coding, and (2) whether the offset value isless than or equal to the quantization index value associated with thelossless coding, wherein the computer program code is further configuredto cause the at least one processor to decode the video bitstreamincluding the coded image in the lossy mode or the lossless mode usingthe quantization step size.

According to embodiments, a method performed by at least one computerprocessor is provided. The method includes obtaining a video bitstream,the video bitstream including: a first quantization index value for acoefficient of a coded image; an offset value; a quantization step sizethat corresponds to the first quantization index value; a secondquantization index value for another coefficient of the coded image, thesecond quantization index value being based on both (1) the firstquantization index value and (2) the offset value and being greater thanor equal to a predetermined threshold value; and a mode indicatingwhether the coded image is to be decoded in a lossy mode or a losslessmode, the mode being determined based on (1) whether the firstquantization index value is equal to a quantization index valueassociated with lossless coding, and (2) whether the offset value isless than or equal to the quantization index value associated with thelossless coding, wherein the method further includes decoding the videobitstream in the lossy mode or the lossless mode using the quantizationstep size.

According to embodiments, a non-transitory computer-readable mediumstoring computer instructions is provided. The computer instructions areconfigured to, when executed by at least one processor, cause the atleast one processor to obtain a video bitstream, the video bitstreamincluding: a first quantization index value for a coefficient of a codedimage; an offset value; a quantization step size that corresponds to thefirst quantization index value; a second quantization index value foranother coefficient of the coded image, the second quantization indexvalue being based on both (1) the first quantization index value and (2)the offset value and being greater than or equal to a predeterminedthreshold value; and a mode indicating whether the coded image is to bedecoded in a lossy mode or a lossless mode, the mode being determinedbased on (1) whether the first quantization index value is equal to aquantization index value associated with lossless coding, and (2)whether the offset value is less than or equal to the quantization indexvalue associated with the lossless coding.

BRIEF DESCRIPTION OF THE DRAWINGS

Further features, the nature, and various advantages of the disclosedsubject matter will be more apparent from the following detaileddescription and the accompanying drawings in which:

FIG. 1 is a schematic illustration of a simplified block diagram of acommunication system in accordance with an embodiment.

FIG. 2 is a schematic illustration of a simplified block diagram of acommunication system in accordance with an embodiment.

FIG. 3 is a schematic illustration of a simplified block diagram of adecoder in accordance with an embodiment.

FIG. 4 is a schematic illustration of a simplified block diagram of anencoder in accordance with an embodiment.

FIG. 5 is a graph that illustrates an example qindex to Qstep mappingfor AC coefficients in a table.

FIG. 6 is a graph that illustrates an example qindex to Qstep mappingfor DC coefficients in a table.

FIG. 7 is a schematic illustration of a simplified block diagram ofaspects of a decoder in accordance with an embodiment.

FIG. 8 is a diagram of a computer system suitable for implementingembodiments.

DETAILED DESCRIPTION

AV1 Quantization

Quantization of transform coefficients may apply different quantizationstep size for DC and AC transform coefficients, and differentquantization step size for luma and chroma transform coefficients. Tospecify the quantization step size, in the frame header, a “base_q_idx”syntax element is first signaled, which is a 8-bit unsigned fixed lengthcode specifying the quantization step size for luma AC coefficients. Thevalid range of “base_q_idx” is [0, 255]. After that, the delta valuerelative to “base_q_idx” for Luma DC coefficients, indicated as“DeltaQYDc” is further signaled. Furthermore, if there are more than onecolor plane, then a flag “diff_uv_delta” is signaled to indicate whetherCb and Cr color components apply different quantization index values. If“diff_uv_delta” is signaled as 0, then only the delta values relative to“base_q_idx” for chroma DC coefficients (indicated as “DeltaQUDc”) andAC coefficients (indicated as “DeltaQUAc”) are signaled. Otherwise, thedelta values relative to “base_q_idx” for both the Cb and Cr DCcoefficients (indicated as “DeltaQUDc” and “DeltaQVDc”) and ACcoefficients (indicated as “DeltaQUAc” and “DeltaQVAc”) are signaled.The delta values are signaled as signed 6-bit integer.

The above decoded “DeltaQYDc”, “DeltaQUAc”, “DeltaQUDc”, “DeltaQVAc” and“DeltaQVDc” are added to “base_q_idx” to derive the quantization indices“qindex”. Then, these indices “qindex” are further mapped toquantization step size according to two tables. For DC coefficients, themapping from quantization index to quantization step size for 8-bit,10-bit, and 12-bit internal bit depth is specified by a lookup table“Dc_Qlookup[3][256]”, and the mapping from quantization index toquantization step size for 8-bit, 10-bit, and 12-bit is specified by alookup table “Ac_Qlookup[3][256]”. An example of the “qindex” to “Qstep”mapping for AC coefficients in a table is illustrated in FIG. 5 , and anexample of the “qindex” to “Qstep” mapping for DC coefficients in atable is illustrated in FIG. 6 . Referring to the graph 500 of FIG. 5 ,8-bit AC is shown with a line that is referenced with the letter “A”,10-bit AC is shown with a line that is referenced with the letter “B”,and 12-bit AC is shown with a line that is referenced with the letter“C”. Referring to graph 600 of FIG. 6 , 8-bit DC is shown with a linethat is referenced with the letter “D”, 10-bit DC is shown with a linethat is referenced with the letter “E”, and 12-bit DC is shown with aline that is referenced with the letter “F”.

Modified Quantization being Studied in AV2

In the ongoing AV2 development process, the following tool has beenproposed regarding to the quantizer design:

The separate look up tables “Dc_Qlookup[3][256]” and“Ac_Qlookup[3][256]” are removed. Only a unified lookup table“Ac_Qlookup[256]” is kept and two additional sequence level syntaxparameters (“base_y_dc_delta_q”, “base_uv_dc_delta_q”) specify the DCoffset for luma and chroma. The DC quantization step sizes for luma andchroma are obtained from the “Ac_Qlookup[256]” using the offset inaddition to the frame level delta's specified in AV1 quantization.

In AV1, quantization step size to use is selected from the lookup tablesusing the following:

-   -   Dc_Qlookup[3][clip(base_q_idx+delta_dc,0,255)] for luma/chroma        DC coefficients    -   Ac_Qlookup[3][clip(base_q_idx+delta_ac,0,255)] for chroma AC        coefficients    -   Ac_Qlookup[3][clip(base_q_idx,0,255)] for luma AC coefficients        where “delta_dc” can be anyone of “DeltaQYDc”, “DeltaQUDc”, or        “DeltaQVDc”; and “delta_ac” can be anyone of “DeltaQUAc” and        “DeltaQVAc”, and the clip( ) function clips the value between 0        and 255.

With the quantizer design in AV1 as well as the modified quantizerproposed for AV2, the quantization step size to use is selected from thelookup table using:

-   -   Dc_Qlookup[clip(base_q_idx+delta_dc,0,255)] for luma/chroma DC        coefficients    -   Ac_Qlookup[clip(base_q_idx+delta_ac,0,255)] for chroma AC        coefficients    -   Ac_Qlookup[clip(base_q_idx,0,255)] for luma AC coefficients        where delta_dc can be anyone of “DeltaQYDc”−“base_y_dc_delta_q”,        “DeltaQUDc”−“base_uv_dc_delta_q”, or        “DeltaQVDc”−“base_uv_dc_delta_q”; and “delta_ac” can be anyone        of “DeltaQUAc” and “DeltaQVAc”, and the clip( ) function clips        the value between 0 and 255.

Moreover, to code the block using the lossless mode in the related art,all the following conditions have to be met in related art:

-   -   base_q_idx==0    -   DeltaQYDc==0    -   DeltaQUAc==0    -   DeltaQUDc==0    -   DeltaQVAc==0    -   DeltaQVDc==0

With the tool proposed for AV2, the conditions for lossless mode ischanged to:

-   -   base_q_idx==0    -   DeltaQYDc−base_y_dc_delta_q<=0    -   DeltaQUAc==0    -   DeltaQUDc−base_uv_dc_delta_q<=0    -   DeltaQVAc==0    -   DeltaQVDc−base_uv_dc_delta_q<=0

If all the above conditions are met, the selected step size is 4 (aftertaking into consideration the scaling factor of 4 introduced by theinvertible 4-point Walsh-Hadamard transform used in lossless mode). Butwhen the conditions described above are not met (lossy mode) andbase_q_idx+delta_dc<=0 or base_q_idx+delta_ac<=0, then theclip(base_q_idx+delta_dc) or clip(base_q_idx+delta_ac) will result inthe “qindex” value zero and the selected step size is still 4. Thetransforms used in this case will be one among combinations of discretecosign transform (DCT), asymmetric discrete sine transform (ADST), oridentity transform (IDTX), which introduces a scaling factor of 8. Thiswill result in a lossy coding mode, albeit with a bitrate higher thanlossless mode (but with a lower peak signal to noise ratio (PSNR) forluma and chroma). Accordingly, the related art has a problem in that thelossy coding mode may result with a higher bit rate than the losslesscoding mode.

Embodiments of the present disclosure solve the above problem and/orother problems.

Embodiments of the present disclosure may provide a set of advancedvideo coding technologies that provide efficient compression of videodata. Embodiments of the present disclosure may provide quantizertechnologies that provide for lossless/near-lossless compression in AV2.

According to one or more embodiments, a system is provided. The systemincludes at least one memory configured to store computer program code;and at least one processor configured to access the computer programcode and operate as instructed by the computer program code. Thecomputer program code includes: first obtaining code configured to causethe at least one processor to obtain a first syntax element thatindicates a first quantization index value for an AC coefficient of acoded image; second obtaining code configured to cause the at least oneprocessor to obtain at least one second syntax element that indicates anoffset value; third obtaining code configured to cause the at least oneprocessor to obtain a second quantization index value for anothercoefficient of the coded image by combining the first quantization indexvalue of the first syntax element and the offset value of the at leastone second syntax element to obtain a combined value, and modifying, ina case where the combined value is less than a predetermined minimumvalue, the combined value to be the predetermined minimum value as thesecond quantization index value; fourth obtaining code configured tocause the at least one processor to obtain a quantization step size thatcorresponds to the second quantization index value that is obtained;determining code configured to cause the at least one processor todetermine whether a mode in which the coded image is to be decoded is alossy mode or a lossless mode based on determining whether the firstquantization index value is equal to a quantization index valueassociated with lossless coding, and based on determining whether theoffset value is less than or equal to the quantization index valueassociated with the lossless coding; first setting code configured tocause the at least one processor to set the predetermined minimum valueto a value, that is compared to the combined value, based on thedetermining of the determining code; and decoding code configured tocause the at least one processor to decode the coded image in the lossymode or the lossless mode based on the determining of the determiningcode, and by using the quantization step size that is obtained.

According to an embodiment, the first setting code is configured tocause the at least one processor to set the predetermined minimum valueto the quantization index value associated with the lossless coding,based on determining that the first quantization index value is equal tothe quantization index value associated with the lossless coding, andbased on determining that the offset value is less than or equal to thequantization index value associated with the lossless coding.

According to an embodiment, the quantization index value associated withthe lossless coding is 0.

According to an embodiment, the quantization index value associated withthe lossless coding is a positive integer value greater than 0.

According to an embodiment, the first setting code is configured tocause the at least one processor to set the predetermined minimum valueto a value different from the quantization index value associated withthe lossless coding, based on determining that the first quantizationindex value is not equal to the quantization index value associated withthe lossless coding, or based on determining that the offset value isgreater than the quantization index value associated with the losslesscoding.

According to an embodiment, the quantization index value associated withthe lossless coding is 0.

According to an embodiment, the quantization index value associated withthe lossless coding is a value different from 0.

According to an embodiment, the fourth obtaining code is configured tocause the at least one processor to obtain the quantization step sizethat corresponds to the second quantization index value by using atleast one lookup table that indicates a correspondence between aplurality of quantization index values and a plurality of quantizationstep sizes, and the computer program code further includes secondsetting code configured to cause the at least one processor to set, inthe at least one lookup table, a quantization step size associated withthe quantization index value associated with the lossless coding.

According to an embodiment, the second setting code is configured tocause the at least one processor to perform an operation of multiplying2^(x) by 4, wherein x is predetermined value, and to set, in the atleast one lookup table, the quantization step size associated with thequantization index value associated with the lossless coding to a resultof the operation.

According to an embodiment, the fourth obtaining code is configured tocause the at least one processor to obtain the quantization step sizethat corresponds to the second quantization index value by using atleast one lookup table that indicates a correspondence between aplurality of quantization index values and a plurality of quantizationstep sizes, and the computer program code further includes secondsetting code configured to cause the at least one processor to set, inthe at least one lookup table, a quantization step size associated withone of the plurality of quantization index values associated with lossycoding.

According to an embodiment, the second setting code is configured tocause the at least one processor to perform an operation of multiplying2^(x) by 8, wherein x is a predetermined value, and to set, in the atleast one lookup table, the quantization step size associated with oneof the plurality of quantization index values associated with the lossycoding to a result of the operation.

According to one or more embodiments, a method is provided. The methodincludes: obtaining a first syntax element that indicates a firstquantization index value for an AC coefficient of a coded image;obtaining at least one second syntax element that indicates an offsetvalue; obtaining a second quantization index value for anothercoefficient of the coded image by combining the first quantization indexvalue of the first syntax element and the offset value of the at leastone second syntax element to obtain a combined value, and modifying,based on the combined value being less than a predetermined minimumvalue, the combined value to be the predetermined minimum value as thesecond quantization index value; obtaining a quantization step size thatcorresponds to the second quantization index value that is obtained;determining whether a mode in which the coded image is to be decoded isa lossy mode or a lossless mode based on determining whether the firstquantization index value is equal to a quantization index valueassociated with lossless coding, and based on determining whether theoffset value is less than or equal to the quantization index valueassociated with the lossless coding; setting the predetermined minimumvalue to a value, that is compared to the combined value, based on thedetermining; and decoding the coded image in the lossy mode or thelossless mode based on the determining, and by using the quantizationstep size that is obtained.

According to an embodiment, the setting includes setting predeterminedminimum value to the quantization index value associated with thelossless coding, based on determining that the first quantization indexvalue is equal to the quantization index value associated with thelossless coding, and based on determining that the offset value is lessthan or equal to the quantization index value associated with thelossless coding.

According to an embodiment, the quantization index value associated withthe lossless coding is a positive integer value greater than 0.

According to an embodiment, the setting includes setting thepredetermined minimum value to a value different from the quantizationindex value associated with the lossless coding, based on determiningthat the first quantization index value is not equal to the quantizationindex value associated with the lossless coding, or based on determiningthat the offset value is greater than the quantization index valueassociated with the lossless coding.

According to an embodiment, the quantization index value associated withthe lossless coding is a value different from 0.

According to an embodiment, the obtaining the quantization step sizeincludes obtaining the quantization step size that corresponds to thesecond quantization index value by using at least one lookup table thatindicates a correspondence between a plurality of quantization indexvalues and a plurality of quantization step sizes, and the methodfurther includes setting, in the at least one lookup table, aquantization step size associated with the quantization index valueassociated with the lossless coding.

According to an embodiment, the obtaining the quantization step sizeincludes obtaining the quantization step size that corresponds to thesecond quantization index value by using at least one lookup table thatindicates a correspondence between a plurality of quantization indexvalues and a plurality of quantization step sizes, and the methodfurther includes setting, in the at least one lookup table, aquantization step size associated with one of the plurality ofquantization index values associated with lossy coding.

According to an embodiment, the setting includes performing an operationof multiplying 2^(x) by 8, wherein x is a predetermined value, andsetting, in the at least one lookup table, the quantization step sizeassociated with the one of the plurality of quantization index valuesassociated with the lossy coding to a result of the operation.

According to one or more embodiments, a non-transitory computer-readablemedium storing computer instructions is provided. The computerinstructions are configured to, when executed by at least one processor,cause the at least one processor to: obtain a first syntax element thatindicates a first quantization index value for an AC coefficient of acoded image; obtain at least one second syntax element that indicates anoffset value; obtain a second quantization index value for anothercoefficient of the coded image by combining the first quantization indexvalue of the first syntax element and the offset value of the at leastone second syntax element to obtain a combined value, and modifying,based on the combined value being less than a predetermined minimumvalue, the combined value to be the predetermined minimum value as thesecond quantization index value; obtain a quantization step size thatcorresponds to the second quantization index value that is obtained;determine whether a mode in which the coded image is to be decoded is alossy mode or a lossless mode based on determining whether the firstquantization index value is equal to a quantization index valueassociated with lossless coding, and based on determining whether theoffset value is less than or equal to the quantization index valueassociated with the lossless coding; set the predetermined minimum valueto a value, that is compared to the combined value, based on thedetermining; and decode the coded image in the lossy mode or thelossless mode based on the determining, and by using the quantizationstep size that is obtained.

FIG. 1 illustrates a simplified block diagram of a communication system(100) according to an embodiment of the present disclosure. The system(100) may include at least two terminals (110, 120) interconnected via anetwork (150). For unidirectional transmission of data, a first terminal(110) may code video data at a local location for transmission to theother terminal (120) via the network (150). The second terminal (120)may receive the coded video data of the other terminal from the network(150), decode the coded data and display the recovered video data.Unidirectional data transmission may be common in media servingapplications and the like.

FIG. 1 illustrates a second pair of terminals (130, 140) provided tosupport bidirectional transmission of coded video that may occur, forexample, during videoconferencing. For bidirectional transmission ofdata, each terminal (130, 140) may code video data captured at a locallocation for transmission to the other terminal via the network (150).Each terminal (130, 140) also may receive the coded video datatransmitted by the other terminal, may decode the coded data, and maydisplay the recovered video data at a local display device.

In FIG. 1 , the terminals (110-140) may be illustrated as servers,personal computers, and smart phones, and/or any other type of terminal.For example, the terminals (110-140) may be laptop computers, tabletcomputers, media players and/or dedicated video conferencing equipment.The network (150) represents any number of networks that convey codedvideo data among the terminals (110-140), including for example wirelineand/or wireless communication networks. The communication network (150)may exchange data in circuit-switched and/or packet-switched channels.Representative networks include telecommunications networks, local areanetworks, wide area networks, and/or the Internet. For the purposes ofthe present discussion, the architecture and topology of the network(150) may be immaterial to the operation of the present disclosureunless explained herein below.

FIG. 2 illustrates, as an example for an application for the disclosedsubject matter, the placement of a video encoder and decoder in astreaming environment. The disclosed subject matter can be equallyapplicable to other video enabled applications, including, for example,video conferencing, digital TV, storing of compressed video on digitalmedia including CD, DVD, memory stick and the like, and so on.

As illustrated in FIG. 2 , a streaming system (200) may include acapture subsystem (213) that can include a video source (201) and anencoder (203). The video source (201) may be, for example, a digitalcamera, and may be configured to create an uncompressed video samplestream (202). The uncompressed video sample stream (202) may provide ahigh data volume when compared to encoded video bitstreams, and can beprocessed by the encoder (203) coupled to the camera (201). The encoder(203) can include hardware, software, or a combination thereof to enableor implement aspects of the disclosed subject matter as described inmore detail below. The encoded video bitstream (204) may include a lowerdata volume when compared to the sample stream, and can be stored on astreaming server (205) for future use. One or more streaming clients(206) can access the streaming server (205) to retrieve video bitstreams (209) that may be copies of the encoded video bitstream (204).

In embodiments, the streaming server (205) may also function as aMedia-Aware Network Element (MANE). For example, the streaming server(205) may be configured to prune the encoded video bitstream (204) fortailoring potentially different bitstreams to one or more of thestreaming clients (206). In embodiments, a MANE may be separatelyprovided from the streaming server (205) in the streaming system (200).

The streaming clients (206) can include a video decoder (210) and adisplay (212). The video decoder (210) can, for example, decode videobitstream (209), which is an incoming copy of the encoded videobitstream (204), and create an outgoing video sample stream (211) thatcan be rendered on the display (212) or another rendering device (notdepicted). In some streaming systems, the video bitstreams (204, 209)can be encoded according to certain video coding/compression standards.Examples of such standards include, but are not limited to, ITU-TRecommendation H.265. Under development is a video coding standardinformally known as Versatile Video Coding (VVC). Embodiments of thedisclosure may be used in the context of VVC.

FIG. 3 illustrates an example functional block diagram of a videodecoder (210) that is attached to a display (212) according to anembodiment of the present disclosure.

The video decoder (210) may include a channel (312), receiver (310), abuffer memory (315), an entropy decoder/parser (320), a scaler/inversetransform unit (351), an intra prediction unit (352), a MotionCompensation Prediction unit (353), an aggregator (355), a loop filterunit (356), reference picture memory (357), and current picture memory (). In at least one embodiment, the video decoder (210) may include anintegrated circuit, a series of integrated circuits, and/or otherelectronic circuitry. The video decoder (210) may also be partially orentirely embodied in software running on one or more CPUs withassociated memories.

In this embodiment, and other embodiments, the receiver (310) mayreceive one or more coded video sequences to be decoded by the decoder(210) one coded video sequence at a time, where the decoding of eachcoded video sequence is independent from other coded video sequences.The coded video sequence may be received from the channel (312), whichmay be a hardware/software link to a storage device which stores theencoded video data. The receiver (310) may receive the encoded videodata with other data, for example, coded audio data and/or ancillarydata streams, that may be forwarded to their respective using entities(not depicted). The receiver (310) may separate the coded video sequencefrom the other data. To combat network jitter, the buffer memory (315)may be coupled in between the receiver (310) and the entropydecoder/parser (320) (“parser” henceforth). When the receiver (310) isreceiving data from a store/forward device of sufficient bandwidth andcontrollability, or from an isosynchronous network, the buffer (315) maynot be used, or can be small. For use on best effort packet networkssuch as the Internet, the buffer (315) may be required, can becomparatively large, and can be of adaptive size.

The video decoder (210) may include a parser (320) to reconstructsymbols (321) from the entropy coded video sequence. Categories of thosesymbols include, for example, information used to manage operation ofthe decoder (210), and potentially information to control a renderingdevice such as a display (212) that may be coupled to a decoder asillustrated in FIG. 2 . The control information for the renderingdevice(s) may be in the form of, for example, Supplementary EnhancementInformation (SEI) messages or Video Usability Information (VUI)parameter set fragments (not depicted). The parser (320) mayparse/entropy-decode the coded video sequence received. The coding ofthe coded video sequence can be in accordance with a video codingtechnology or standard, and can follow principles well known to a personskilled in the art, including variable length coding, Huffman coding,arithmetic coding with or without context sensitivity, and so forth. Theparser (320) may extract from the coded video sequence, a set ofsubgroup parameters for at least one of the subgroups of pixels in thevideo decoder, based upon at least one parameter corresponding to thegroup. Subgroups can include Groups of Pictures (GOPs), pictures, tiles,slices, macroblocks, Coding Units (CUs), blocks, Transform Units (TUs),Prediction Units (PUs) and so forth. The parser (320) may also extractfrom the coded video sequence information such as transformcoefficients, quantizer parameter values, motion vectors, and so forth.

The parser (320) may perform entropy decoding/parsing operation on thevideo sequence received from the buffer (315), so to create symbols(321).

Reconstruction of the symbols (321) can involve multiple different unitsdepending on the type of the coded video picture or parts thereof (suchas: inter and intra picture, inter and intra block), and other factors.Which units are involved, and how they are involved, can be controlledby the subgroup control information that was parsed from the coded videosequence by the parser (320). The flow of such subgroup controlinformation between the parser (320) and the multiple units below is notdepicted for clarity.

Beyond the functional blocks already mentioned, decoder 210 can beconceptually subdivided into a number of functional units as describedbelow. In a practical implementation operating under commercialconstraints, many of these units interact closely with each other andcan, at least partly, be integrated into each other. However, for thepurpose of describing the disclosed subject matter, the conceptualsubdivision into the functional units below is appropriate.

One unit may be the scaler/inverse transform unit (351). Thescaler/inverse transform unit (351) may receive quantized transformcoefficient as well as control information, including which transform touse, block size, quantization factor, quantization scaling matrices,etc. as symbol(s) (321) from the parser (320). The scaler/inversetransform unit (351) can output blocks including sample values that canbe input into the aggregator (355).

In some cases, the output samples of the scaler/inverse transform (351)can pertain to an intra coded block; that is: a block that is not usingpredictive information from previously reconstructed pictures, but canuse predictive information from previously reconstructed parts of thecurrent picture. Such predictive information can be provided by an intrapicture prediction unit (352). In some cases, the intra pictureprediction unit (352) generates a block of the same size and shape ofthe block under reconstruction, using surrounding already reconstructedinformation fetched from the current (partly reconstructed) picture fromthe current picture memory (358). The aggregator (355), in some cases,adds, on a per sample basis, the prediction information the intraprediction unit (352) has generated to the output sample information asprovided by the scaler/inverse transform unit (351).

In other cases, the output samples of the scaler/inverse transform unit(351) can pertain to an inter coded, and potentially motion compensatedblock. In such a case, a Motion Compensation Prediction unit (353) canaccess reference picture memory (357) to fetch samples used forprediction. After motion compensating the fetched samples in accordancewith the symbols (321) pertaining to the block, these samples can beadded by the aggregator (355) to the output of the scaler/inversetransform unit (351) (in this case called the residual samples orresidual signal) so to generate output sample information. The addresseswithin the reference picture memory (357), from which the MotionCompensation Prediction unit (353) fetches prediction samples, can becontrolled by motion vectors. The motion vectors may be available to theMotion Compensation Prediction unit (353) in the form of symbols (321)that can have, for example, X, Y, and reference picture components.Motion compensation also can include interpolation of sample values asfetched from the reference picture memory (357) when sub-sample exactmotion vectors are in use, motion vector prediction mechanisms, and soforth.

The output samples of the aggregator (355) can be subject to variousloop filtering techniques in the loop filter unit (356). Videocompression technologies can include in-loop filter technologies thatare controlled by parameters included in the coded video bitstream andmade available to the loop filter unit (356) as symbols (321) from theparser (320), but can also be responsive to meta-information obtainedduring the decoding of previous (in decoding order) parts of the codedpicture or coded video sequence, as well as responsive to previouslyreconstructed and loop-filtered sample values.

The output of the loop filter unit (356) can be a sample stream that canbe output to a render device such as a display (212), as well as storedin the reference picture memory (357) for use in future inter-pictureprediction.

Certain coded pictures, once fully reconstructed, can be used asreference pictures for future prediction. Once a coded picture is fullyreconstructed and the coded picture has been identified as a referencepicture (by, for example, parser (320)), the current reference picturecan become part of the reference picture memory (357), and a freshcurrent picture memory can be reallocated before commencing thereconstruction of the following coded picture.

The video decoder (210) may perform decoding operations according to apredetermined video compression technology that may be documented in astandard, such as ITU-T Rec. H.265. The coded video sequence may conformto a syntax specified by the video compression technology or standardbeing used, in the sense that it adheres to the syntax of the videocompression technology or standard, as specified in the videocompression technology document or standard and specifically in theprofiles document therein. Also, for compliance with some videocompression technologies or standards, the complexity of the coded videosequence may be within bounds as defined by the level of the videocompression technology or standard. In some cases, levels restrict themaximum picture size, maximum frame rate, maximum reconstruction samplerate (measured in, for example megasamples per second), maximumreference picture size, and so on. Limits set by levels can, in somecases, be further restricted through Hypothetical Reference Decoder(HRD) specifications and metadata for HRD buffer management signaled inthe coded video sequence.

In an embodiment, the receiver (310) may receive additional (redundant)data with the encoded video. The additional data may be included as partof the coded video sequence(s). The additional data may be used by thevideo decoder (210) to properly decode the data and/or to moreaccurately reconstruct the original video data. Additional data can bein the form of, for example, temporal, spatial, or SNR enhancementlayers, redundant slices, redundant pictures, forward error correctioncodes, and so on.

FIG. 4 illustrates an example functional block diagram of a videoencoder (203) associated with a video source (201) according to anembodiment of the present disclosure.

The video encoder (203) may include, for example, an encoder that is asource coder (430), a coding engine (432), a (local) decoder (433), areference picture memory (434), a predictor (435), a transmitter (440),an entropy coder (445), a controller (450), and a channel (460).

The encoder (203) may receive video samples from a video source (201)(that is not part of the encoder) that may capture video image(s) to becoded by the encoder (203).

The video source (201) may provide the source video sequence to be codedby the encoder (203) in the form of a digital video sample stream thatcan be of any suitable bit depth (for example: 8 bit, 10 bit, 12 bit, .. . ), any colorspace (for example, BT.601 Y CrCB, RGB, . . . ) and anysuitable sampling structure (for example Y CrCb 4:2:0, Y CrCb 4:4:4). Ina media serving system, the video source (201) may be a storage devicestoring previously prepared video. In a videoconferencing system, thevideo source (203) may be a camera that captures local image informationas a video sequence. Video data may be provided as a plurality ofindividual pictures that impart motion when viewed in sequence. Thepictures themselves may be organized as a spatial array of pixels,wherein each pixel can comprise one or more sample depending on thesampling structure, color space, etc. in use. A person skilled in theart can readily understand the relationship between pixels and samples.The description below focuses on samples.

According to an embodiment, the encoder (203) may code and compress thepictures of the source video sequence into a coded video sequence (443)in real time or under any other time constraints as required by theapplication. Enforcing appropriate coding speed is one function ofcontroller (450). The controller (450) may also control other functionalunits as described below and may be functionally coupled to these units.The coupling is not depicted for clarity. Parameters set by thecontroller (450) can include rate control related parameters (pictureskip, quantizer, lambda value of rate-distortion optimizationtechniques, . . . ), picture size, group of pictures (GOP) layout,maximum motion vector search range, and so forth. A person skilled inthe art can readily identify other functions of controller (450) as theymay pertain to video encoder (203) optimized for a certain systemdesign.

Some video encoders operate in what a person skilled in the are readilyrecognizes as a “coding loop”. As an oversimplified description, acoding loop can consist of the encoding part of the source coder (430)(responsible for creating symbols based on an input picture to be coded,and a reference picture(s)), and the (local) decoder (433) embedded inthe encoder (203) that reconstructs the symbols to create the sampledata that a (remote) decoder also would create when a compressionbetween symbols and coded video bitstream is lossless in certain videocompression technologies. That reconstructed sample stream may be inputto the reference picture memory (434). As the decoding of a symbolstream leads to bit-exact results independent of decoder location (localor remote), the reference picture memory content is also bit exactbetween a local encoder and a remote encoder. In other words, theprediction part of an encoder “sees” as reference picture samplesexactly the same sample values as a decoder would “see” when usingprediction during decoding. This fundamental principle of referencepicture synchronicity (and resulting drift, if synchronicity cannot bemaintained, for example because of channel errors) is known to a personskilled in the art.

The operation of the “local” decoder (433) can be the same as of a“remote” decoder (210), which has already been described in detail abovein conjunction with FIG. 3 . However, as symbols are available anden/decoding of symbols to a coded video sequence by the entropy coder(445) and the parser (320) can be lossless, the entropy decoding partsof decoder (210), including channel (312), receiver (310), buffer (315),and parser (320) may not be fully implemented in the local decoder(433).

An observation that can be made at this point is that any decodertechnology, except the parsing/entropy decoding that is present in adecoder, may need to be present, in substantially identical functionalform in a corresponding encoder. For this reason, the disclosed subjectmatter focuses on decoder operation. The description of encodertechnologies can be abbreviated as they may be the inverse of thecomprehensively described decoder technologies. Only in certain areas amore detail description is required and provided below.

As part of its operation, the source coder (430) may perform motioncompensated predictive coding, which codes an input frame predictivelywith reference to one or more previously-coded frames from the videosequence that were designated as “reference frames.” In this manner, thecoding engine (432) codes differences between pixel blocks of an inputframe and pixel blocks of reference frame(s) that may be selected asprediction reference(s) to the input frame.

The local video decoder (433) may decode coded video data of frames thatmay be designated as reference frames, based on symbols created by thesource coder (430). Operations of the coding engine (432) mayadvantageously be lossy processes. When the coded video data may bedecoded at a video decoder (not shown in FIG. 4 ), the reconstructedvideo sequence typically may be a replica of the source video sequencewith some errors. The local video decoder (433) replicates decodingprocesses that may be performed by the video decoder on reference framesand may cause reconstructed reference frames to be stored in thereference picture memory (434). In this manner, the encoder (203) maystore copies of reconstructed reference frames locally that have commoncontent as the reconstructed reference frames that will be obtained by afar-end video decoder (absent transmission errors).

The predictor (435) may perform prediction searches for the codingengine (432). That is, for a new frame to be coded, the predictor (435)may search the reference picture memory (434) for sample data (ascandidate reference pixel blocks) or certain metadata such as referencepicture motion vectors, block shapes, and so on, that may serve as anappropriate prediction reference for the new pictures. The predictor(435) may operate on a sample block-by-pixel block basis to findappropriate prediction references. In some cases, as determined bysearch results obtained by the predictor (435), an input picture mayhave prediction references drawn from multiple reference pictures storedin the reference picture memory (434).

The controller (450) may manage coding operations of the video coder(430), including, for example, setting of parameters and subgroupparameters used for encoding the video data.

Output of all aforementioned functional units may be subjected toentropy coding in the entropy coder (445). The entropy coder translatesthe symbols as generated by the various functional units into a codedvideo sequence, by loss-less compressing the symbols according totechnologies known to a person skilled in the art as, for exampleHuffman coding, variable length coding, arithmetic coding, and so forth.

The transmitter (440) may buffer the coded video sequence(s) as createdby the entropy coder (445) to prepare it for transmission via acommunication channel (460), which may be a hardware/software link to astorage device which would store the encoded video data. The transmitter(440) may merge coded video data from the video coder (430) with otherdata to be transmitted, for example, coded audio data and/or ancillarydata streams (sources not shown).

The controller (450) may manage operation of the encoder (203). Duringcoding, the controller (450) may assign to each coded picture a certaincoded picture type, which may affect the coding techniques that may beapplied to the respective picture. For example, pictures often may beassigned as an Intra Picture (I picture), a Predictive Picture (Ppicture), or a Bi-directionally Predictive Picture (B Picture).

An Intra Picture (I picture) may be one that may be coded and decodedwithout using any other frame in the sequence as a source of prediction.Some video codecs allow for different types of Intra pictures,including, for example Independent Decoder Refresh (IDR) Pictures. Aperson skilled in the art is aware of those variants of I pictures andtheir respective applications and features.

A Predictive picture (P picture) may be one that may be coded anddecoded using intra prediction or inter prediction using at most onemotion vector and reference index to predict the sample values of eachblock.

A Bi-directionally Predictive Picture (B Picture) may be one that may becoded and decoded using intra prediction or inter prediction using atmost two motion vectors and reference indices to predict the samplevalues of each block. Similarly, multiple-predictive pictures can usemore than two reference pictures and associated metadata for thereconstruction of a single block.

Source pictures commonly may be subdivided spatially into a plurality ofsample blocks (for example, blocks of 4×4, 8×8, 4×8, or 16×16 sampleseach) and coded on a block-by-block basis. Blocks may be codedpredictively with reference to other (already coded) blocks asdetermined by the coding assignment applied to the blocks' respectivepictures. For example, blocks of I pictures may be codednon-predictively or they may be coded predictively with reference toalready coded blocks of the same picture (spatial prediction or intraprediction). Pixel blocks of P pictures may be coded non-predictively,via spatial prediction or via temporal prediction with reference to onepreviously coded reference pictures. Blocks of B pictures may be codednon-predictively, via spatial prediction or via temporal prediction withreference to one or two previously coded reference pictures.

The video coder (203) may perform coding operations according to apredetermined video coding technology or standard, such as ITU-T Rec.H.265. In its operation, the video coder (203) may perform variouscompression operations, including predictive coding operations thatexploit temporal and spatial redundancies in the input video sequence.The coded video data, therefore, may conform to a syntax specified bythe video coding technology or standard being used.

In an embodiment, the transmitter (440) may transmit additional datawith the encoded video. The video coder (430) may include such data aspart of the coded video sequence. Additional data may comprisetemporal/spatial/SNR enhancement layers, other forms of redundant datasuch as redundant pictures and slices, Supplementary EnhancementInformation (SEI) messages, Visual Usability Information (VUI) parameterset fragments, and so on.

Before describing certain aspects of embodiments of the disclosure inmore detail, a few terms are introduced below that are referred to inthe remainder of this description.

“Sub-Picture” henceforth refers to, in some cases, a rectangulararrangement of samples, blocks, macroblocks, coding units, or similarentities that are semantically grouped, and that may be independentlycoded in changed resolution. One or more sub-pictures may form apicture. One or more coded sub-pictures may form a coded picture. One ormore sub-pictures may be assembled into a picture, and one or more subpictures may be extracted from a picture. In certain environments, oneor more coded sub-pictures may be assembled in the compressed domainwithout transcoding to the sample level into a coded picture, and in thesame or certain other cases, one or more coded sub-pictures may beextracted from a coded picture in the compressed domain.

“Adaptive Resolution Change” (ARC) henceforth refers to mechanisms thatallow the change of resolution of a picture or sub-picture within acoded video sequence, by the means of, for example, reference pictureresampling. “ARC parameters” henceforth refer to the control informationrequired to perform adaptive resolution change, that may include, forexample, filter parameters, scaling factors, resolutions of outputand/or reference pictures, various control flags, and so forth.

Systems and methods of the present disclosure may be used separately orcombined in any order. In the present disclosure, the term “DeltaQ” mayrefer to a set of all offset values or combination of offset valuesapplied to “base_q_idx.” The elements of set “DeltaQ” includes, but isnot limited to: {“DeltaQYDc”, “DeltaQUDc”, “DeltaQVDc”, “DeltaQUAc”,“DeltaQVAc”, “base_y_dc_delta_q”, “base_uv_dc_delta_q”,“DeltaQYDc”−“base_y_dc_delta_q”, “DeltaQUDc”−“base_uv_dc_delta_q”,“DeltaQVDc”−“base_uv_dc_delta_q”}. In the present disclosure, the qindexvalue associated with lossless coding is denoted as “qindex_lossless”.The value of “qindex_lossless” in AV1 is 0.

Embodiments of the present disclosure may implement aspects of therelated art referenced herein, and may be different from the related artas described below.

According to one or more embodiments, the conditions required to be metfor lossless/lossy mode may be different from the related art.

In one embodiment, lossless mode is applied when “base_q_idx” is equalto “qindex_lossless” and all elements of “DeltaQ” is less than or equalto “qindex_lossless”.

In one embodiment, lossy mode is applied when “base_q_idx” is not equalto “qindex_lossless” or “DeltaQ” is different from “qindex_lossless”.

In one embodiment, lossless mode is applied when the “qindex” value“qindex_lossless” is applied for all coefficients, regardless whetherthe coefficients are from AC or DC, or luma or chroma.

According to one or more embodiments, the accessible “qindex_lossless”for lossless mode may be different from the related art.

In one embodiment, if base_q_idx+DeltaQ is less than or equal to zero,“base_q_idx” is equal to “qindex_lossless”, and all elements of “DeltaQ”is less than or equal to “qindex_lossless”, the clip(base_q_idx+DeltaQ)will result in a value of zero, which may be the “qindex_lossless”value.

In one embodiment, if base_q_idx+DeltaQ is less than or equal to zero,“base_q_idx” is equal to “qindex_lossless”, and all elements of “DeltaQ”is less than or equal to “qindex_lossless”, the clip(base_q_idx+DeltaQ)will result in a value of A (that may also be the “qindex_lossless”value), wherein A is a fixed positive integer value other than zero.

In one embodiment, when the range of “base_q_idx” values can beconfigured, the value of A depends on range of “base_q_idx”. Examplevalues of “base_q_idx” include, but are not limited to, 51, 63, 127,255. Example values of A include, but are not limited to, 0, 1, 2, 3, 4.

According to one or more embodiments, the smallest accessible “qindex”for lossy mode may be different from the related art. For example, adecoder of the present disclosure may determine that the mode is lossyor lossless based on determining whether certain conditions are met, andset a floor of the clip function so as to have an appropriate A value(equal or not equal to qindex_lossless).

In one embodiment, if base_q_idx+DeltaQ is less than zero, and“base_q_idx” is not equal to “qindex_lossless” and/or all elements of“DeltaQ” is not less than or equal to “qindex_lossless”,clip(base_q_idx+DeltaQ) will result in a “qindex” value of a non-zerovalue A that is not equal to “qindex_lossless”. Example value of Aincludes, but is not limited to, 1, 2, 3, 4, . . . , 24. For example, adecoder of the present disclosure may set a floor of the clip functionsuch that a value is clipped, and a resulting “qindex” value has a valueA that is greater than the “qindex_lossless” value, where“qindex_lossless” equals 0. That is, for example, the floor may be avalue n, where n is a positive integer.

In one embodiment, if base_q_idx+DeltaQ is less than zero, and“base_q_idx” is not equal to “qindex_lossless” and/or all elements of“DeltaQ” is not less than or equal to “qindex_lossless”,clip(base_q_idx+DeltaQ) will result in a “qindex” value of a value Athat is not associated with lossless coding (e.g. not equal to“qindex_lossless”). Example value of A includes, but is not limited to0, 1, 2, 3, 4, . . . , 24. For example, a decoder of the presentdisclosure may set a floor of the clip function such that a value isclipped, and a resulting “qindex” has a value A that is different thanthe “qindex_lossless” value, where “qindex_lossless” equals an integer.That is, for example, the floor may be a value n, where n is greaterthan the value of “qindex_lossless”.

According to one or more embodiments, the quantization step size usedfor lossless mode may be different from the related art.

In one embodiment, the quantization step used for lossless coding may bethe result of the equation 4*POWER(2, precision). For example, decodersof the present disclosure may calculate the quantization step forlossless coding by using the above equation. Example values of“precision” include, but are not limited to 0, 1, 2, 3, 4, 5.

According to embodiments, the output of transform (such as Hadamardtransform in AV1) applied for lossless coding mode is further rightshift by N bit, where N is equal to the value of “precision”. Forexample, in one embodiment, the right shift N is done in such a way thatthe intermediate coefficients derived during the application of row andcolumn transforms fall within 16+bitdepth_offset bit range, wherein the“bitdepth_offset” depends on the internal bitdepth. Example values of“bitdepth_offset” include, but not limited to, 0, 2, 4. In oneembodiment, the value of “bitdepth_offset” used can be different for rowand column transforms for a specified internal bitdepth.

According to one or more embodiments, the smallest accessiblequantization step size used for lossy mode may be different from therelated art.

In one embodiment, the smallest quantization step sized used for lossycoding may be the result of the equation 8*POWER(2,precision). Forexample, decoders of the present disclosure may calculate the smallestaccessible quantization step for lossy coding by using the aboveequation. Example values of “precision” include, but are not limited to0, 1, 2, 3, 4, and 5.

According to embodiments, the output of transform applied for lossycoding is further right shift by N bit, where N is equal to “precision”.For example, in one embodiment, the right shift N is done in such a waythat the intermediate coefficients derived during the application of rowand column transforms fall within 16+bitdepth_offset bit range, whereinthe “bitdepth_offset” depends on the internal bitdepth. Example valuesof “bitdepth_offset” include, but not limited to, 0, 2, 4. In oneembodiment, the value of “bitdepth_offset” used can be different for rowand column transforms for a specified internal bitdepth.

Embodiments of the present disclosure may comprise at least oneprocessor and memory storing computer instructions. The computerinstructions, when executed by the at least one processor, may beconfigured to cause the at least one processor to perform the functionsof the embodiments of the present disclosure.

For example, with reference to FIG. 7 , a decoder (700) of the presentdisclosure may comprise at least one processor and memory storingcomputer instructions. The computer instructions may comprise firstobtaining code (710), second obtaining code (720), third obtaining code(730), fourth obtaining code (740), determining code (750), firstsetting code (760), second setting code (770), and decoding code (780).The decoder (700) may implement the video decoder (210) illustrated inFIGS. 2-3 .

The first obtaining code (710) may be configured to cause the at leastone processor to obtain a first syntax element (e.g. base_q_idx) thatindicates a first quantization index value for an AC coefficient of acoded image.

The second obtaining code (720) may be configured to cause the at leastone processor to obtain at least one second syntax element (e.g. one ormore elements of the set DeltaQ) that indicates an offset value.

The third obtaining code (730) may be configured to cause the at leastone processor to obtain a second quantization index value for anothercoefficient of the coded image by combining the first quantization indexvalue of the first syntax element and the offset value of the at leastone second syntax element to obtain a combined value, and modifying, ina case where the combined value is less than a predetermined minimumvalue, the combined value to be the predetermined minimum value as thesecond quantization index value. The combining may refer to combiningthe value of “base_q_idx” with the value of one or more elements of“DeltaQ”, as described in the present disclosure. The modifying mayrefer to applying a clip function as described in the presentdisclosure.

The fourth obtaining code (740) may be configured to cause the at leastone processor to obtain a quantization step size that corresponds to thesecond quantization index value that is obtained. For example, accordingto one or more embodiments, the fourth obtaining code (740) may beconfigured to cause the at least one processor to obtain thequantization step size that corresponds to the second quantization indexvalue by using at least one lookup table that indicates a correspondencebetween a plurality of quantization index values and a plurality ofquantization step sizes.

The determining code (750) may be configured to cause the at least oneprocessor to determine whether a mode in which the coded image is to bedecoded is a lossy mode or a lossless mode based on, for example,determining whether the first quantization index value is equal to aquantization index value (e.g. “qindex_lossless”) associated withlossless coding, and based on determining whether the offset value isless than or equal to the quantization index value associated with thelossless coding.

The first setting code (760) may be configured to cause the at least oneprocessor to set the predetermined minimum value (e.g. the lowerboundary of the clip function) to a value, that is compared to thecombined value, based on the determining of the determining code. Forexample, according to one or more embodiments, the first setting code(760) may be configured to cause the at least one processor to set thepredetermined minimum value to the quantization index value associatedwith the lossless coding, based on determining that the firstquantization index value is equal to the quantization index valueassociated with the lossless coding, and based on determining that theoffset value is less than or equal to the quantization index valueassociated with the lossless coding. According to one or moreembodiments, the first setting code (760) may be configured to cause theat least one processor to set the predetermined minimum value to a valuedifferent from the quantization index value associated with the losslesscoding, based on determining that the first quantization index value isnot equal to the quantization index value associated with the losslesscoding, or based on determining that the offset value is greater thanthe quantization index value associated with the lossless coding. Thequantization index value (e.g. qindex_lossless) associated with thelossless coding may be 0 or a value different from 0. According to theabove, the first setting code (760) may be configured to modify the clipfunctions of the present disclosure.

The second setting code (770) may be configured to cause the at leastone processor to set, in the at least one lookup table, a quantizationstep size associated with the quantization index value associated withthe lossless coding. For example, according to one or more embodiments,the second setting code (770) may be configured to cause the at leastone processor to perform an operation of multiplying 2^(x) by 4, whereinx is predetermined value, and to set, in the at least one lookup table,the quantization step size associated with the quantization index valueassociated with the lossless coding to a result of the operation.Alternatively or additionaly, the second setting code (770) may beconfigured to cause the at least one processor to set, in the at leastone lookup table, a quantization step size associated with one of theplurality of quantization index values associated with lossy coding. Forexample, according to one or more embodiments, the second setting code(770) may be configured to cause the at least one processor to performan operation of multiplying 2^(x) by 8, wherein x is a predeterminedvalue, and to set, in the at least one lookup table, the quantizationstep size associated with one of the plurality of quantization indexvalues associated with the lossy coding to a result of the operation.

The decoding code (780) may be configured to cause the at least oneprocessor to decode the coded image in the lossy mode or the losslessmode based on the determining of the determining code, and by using thequantization step size that is obtained.

The techniques of embodiments of the present disclosure described above,can be implemented as computer software using computer-readableinstructions and physically stored in one or more computer-readablemedia. For example, FIG. 8 shows a computer system (900) suitable forimplementing embodiments of the disclosed subject matter.

The computer software can be coded using any suitable machine code orcomputer language, that may be subject to assembly, compilation,linking, or like mechanisms to create code comprising instructions thatcan be executed directly, or through interpretation, micro-codeexecution, and the like, by computer central processing units (CPUs),Graphics Processing Units (GPUs), and the like.

The instructions can be executed on various types of computers orcomponents thereof, including, for example, personal computers, tabletcomputers, servers, smartphones, gaming devices, internet of thingsdevices, and the like.

The components shown in FIG. 8 for computer system (900) are exemplaryin nature and are not intended to suggest any limitation as to the scopeof use or functionality of the computer software implementingembodiments of the present disclosure. Neither should the configurationof components be interpreted as having any dependency or requirementrelating to any one or combination of components illustrated in theexemplary embodiment of a computer system (900).

Computer system (900) may include certain human interface input devices.Such a human interface input device may be responsive to input by one ormore human users through, for example, tactile input (such as:keystrokes, swipes, data glove movements), audio input (such as: voice,clapping), visual input (such as: gestures), olfactory input (notdepicted). The human interface devices can also be used to capturecertain media not necessarily directly related to conscious input by ahuman, such as audio (such as: speech, music, ambient sound), images(such as: scanned images, photographic images obtain from a still imagecamera), video (such as two-dimensional video, three-dimensional videoincluding stereoscopic video).

Input human interface devices may include one or more of (only one ofeach depicted): keyboard (901), mouse (902), trackpad (903), touchscreen (910), data-glove, joystick (905), microphone (906), scanner(907), and camera (908).

Computer system (900) may also include certain human interface outputdevices. Such human interface output devices may be stimulating thesenses of one or more human users through, for example, tactile output,sound, light, and smell/taste. Such human interface output devices mayinclude tactile output devices (for example tactile feedback by thetouch-screen (910), data-glove, or joystick (905), but there can also betactile feedback devices that do not serve as input devices). Forexample, such devices may be audio output devices (such as: speakers(909), headphones (not depicted)), visual output devices (such asscreens (910) to include CRT screens, LCD screens, plasma screens, OLEDscreens, each with or without touch-screen input capability, each withor without tactile feedback capability—some of which may be capable tooutput two dimensional visual output or more than three dimensionaloutput through means such as stereographic output; virtual-realityglasses (not depicted), holographic displays and smoke tanks (notdepicted)), and printers (not depicted).

Computer system (900) can also include human accessible storage devicesand their associated media such as optical media including CD/DVD ROM/RW(920) with CD/DVD or the like media (921), thumb-drive (922), removablehard drive or solid state drive (923), legacy magnetic media such astape and floppy disc (not depicted), specialized ROM/ASIC/PLD baseddevices such as security dongles (not depicted), and the like.

Those skilled in the art should also understand that term “computerreadable media” as used in connection with the presently disclosedsubject matter does not encompass transmission media, carrier waves, orother transitory signals.

Computer system (900) can also include interface to one or morecommunication networks. Networks can for example be wireless, wireline,optical. Networks can further be local, wide-area, metropolitan,vehicular and industrial, real-time, delay-tolerant, and so on. Examplesof networks include local area networks such as Ethernet, wireless LANs,cellular networks to include GSM, 3G, 4G, 5G, LTE and the like, TVwireline or wireless wide area digital networks to include cable TV,satellite TV, and terrestrial broadcast TV, vehicular and industrial toinclude CANBus, and so forth. Certain networks commonly require externalnetwork interface adapters that attached to certain general purpose dataports or peripheral buses (949) (such as, for example USB ports of thecomputer system (900); others are commonly integrated into the core ofthe computer system 900 by attachment to a system bus as described below(for example Ethernet interface into a PC computer system or cellularnetwork interface into a smartphone computer system). Using any of thesenetworks, computer system (900) can communicate with other entities.Such communication can be uni-directional, receive only (for example,broadcast TV), uni-directional send-only (for example CANbus to certainCANbus devices), or bi-directional, for example to other computersystems using local or wide area digital networks. Such communicationcan include communication to a cloud computing environment (955).Certain protocols and protocol stacks can be used on each of thosenetworks and network interfaces as described above.

Aforementioned human interface devices, human-accessible storagedevices, and network interfaces (954) can be attached to a core (940) ofthe computer system (900).

The core (940) can include one or more Central Processing Units (CPU)(941), Graphics Processing Units (GPU) (942), specialized programmableprocessing units in the form of Field Programmable Gate Areas (FPGA)(943), hardware accelerators (944) for certain tasks, and so forth.These devices, along with Read-only memory (ROM) (945), Random-accessmemory (946), internal mass storage such as internal non-user accessiblehard drives, SSDs, and the like (947), may be connected through a systembus (948). In some computer systems, the system bus (948) can beaccessible in the form of one or more physical plugs to enableextensions by additional CPUs, GPU, and the like. The peripheral devicescan be attached either directly to the core's system bus (948), orthrough a peripheral bus (949). Architectures for a peripheral businclude PCI, USB, and the like. A graphics adapter 950 may be includedin the core 940.

CPUs (941), GPUs (942), FPGAs (943), and accelerators (944) can executecertain instructions that, in combination, can make up theaforementioned computer code. That computer code can be stored in ROM(945) or RAM (946). Transitional data can be also be stored in RAM(946), whereas permanent data can be stored for example, in the internalmass storage (947). Fast storage and retrieve to any of the memorydevices can be enabled through the use of cache memory, that can beclosely associated with one or more CPU (941), GPU (942), mass storage(947), ROM (945), RAM (946), and the like.

The computer readable media can have computer code thereon forperforming various computer-implemented operations. The media andcomputer code can be those specially designed and constructed for thepurposes of the present disclosure, or they can be of the kind wellknown and available to those having skill in the computer software arts.

As an example and not by way of limitation, the computer system havingarchitecture (900), and specifically the core (940) can providefunctionality as a result of processor(s) (including CPUs, GPUs, FPGA,accelerators, and the like) executing software embodied in one or moretangible, computer-readable media. Such computer-readable media can bemedia associated with user-accessible mass storage as introduced above,as well as certain storage of the core (940) that are of non-transitorynature, such as core-internal mass storage (947) or ROM (945). Thesoftware implementing various embodiments of the present disclosure canbe stored in such devices and executed by core (940). Acomputer-readable medium can include one or more memory devices orchips, according to particular needs. The software can cause the core(940) and specifically the processors therein (including CPU, GPU, FPGA,and the like) to execute particular processes or particular parts ofparticular processes described herein, including defining datastructures stored in RAM (946) and modifying such data structuresaccording to the processes defined by the software. In addition or as analternative, the computer system can provide functionality as a resultof logic hardwired or otherwise embodied in a circuit (for example:accelerator (944)), which can operate in place of or together withsoftware to execute particular processes or particular parts ofparticular processes described herein. Reference to software canencompass logic, and vice versa, where appropriate. Reference to acomputer-readable media can encompass a circuit (such as an integratedcircuit (IC)) storing software for execution, a circuit embodying logicfor execution, or both, where appropriate. The present disclosureencompasses any suitable combination of hardware and software.

While this disclosure has described several non-limiting exampleembodiments, there are alterations, permutations, and various substituteequivalents, which fall within the scope of the disclosure. It will thusbe appreciated that those skilled in the art will be able to devisenumerous systems and methods which, although not explicitly shown ordescribed herein, embody the principles of the disclosure and are thuswithin the spirit and scope thereof.

What is claimed is:
 1. A system comprising: at least one memory configured to store computer program code; and at least one processor configured to access the computer program code and operate as instructed by the computer program code, the computer program code configured to cause the at least one processor to obtain a video bitstream, the video bitstream comprising: a first quantization index value for a coefficient of a coded image; an offset value; a quantization step size that corresponds to the first quantization index value; a second quantization index value for another coefficient of the coded image, the second quantization index value being based on both (1) the first quantization index value and (2) the offset value and being greater than or equal to a predetermined threshold value; and a mode indicating whether the coded image is to be decoded in a lossy mode or a lossless mode, the mode being determined based on (1) whether the first quantization index value is equal to a quantization index value associated with lossless coding, and (2) whether the offset value is less than or equal to the quantization index value associated with the lossless coding, wherein the computer program code is further configured to cause the at least one processor to decode the video bitstream comprising the coded image in the lossy mode or the lossless mode using the quantization step size.
 2. The system of claim 1, wherein the computer program code is configured to cause the at least one processor to obtain the second quantization index value for the another coefficient of the coded image by combining the first quantization index value and the offset value to obtain a combined value, and modifying, in a case where the combined value is less than a predetermined minimum value, the combined value to be the predetermined minimum value as the second quantization index value.
 3. The system of claim 1, wherein the quantization index value associated with the lossless coding is
 0. 4. The system of claim 1, wherein the quantization index value associated with the lossless coding is a positive integer value greater than
 0. 5. The system of claim 2, further comprising: the computer program code is further configured to cause the at least one processor to set the predetermined minimum value to a value different from the quantization index value associated with the lossless coding, based on determining that the first quantization index value is not equal to the quantization index value associated with the lossless coding, or based on determining that the offset value is greater than the quantization index value associated with the lossless coding.
 6. The system of claim 5, wherein the quantization index value associated with the lossless coding is
 0. 7. The system of claim 5, wherein the quantization index value associated with the lossless coding is a value different from
 0. 8. The system of claim 1, wherein the computer program code is configured to cause the at least one processor to obtain the quantization step size that corresponds to the second quantization index value by using at least one lookup table that indicates a correspondence between a plurality of quantization index values and a plurality of quantization step sizes, and the computer program code is further configured to cause the at least one processor to set, in the at least one lookup table, a quantization step size associated with the quantization index value associated with the lossless coding.
 9. The system of claim 8, wherein the computer program code is further configured to cause the at least one processor to perform an operation of multiplying 2x by 4, wherein x is a predetermined value, and to set, in the at least one lookup table, the quantization step size associated with the quantization index value associated with the lossless coding to a result of the operation.
 10. The system of claim 1, wherein the computer program code is further configured to cause the at least one processor to obtain the quantization step size that corresponds to the second quantization index value by using at least one lookup table that indicates a correspondence between a plurality of quantization index values and a plurality of quantization step sizes, and the computer program code is configured to cause the at least one processor to set, in the at least one lookup table, a quantization step size associated with one of the plurality of quantization index values associated with lossy coding.
 11. The system of claim 10, wherein the computer program code is configured to cause the at least one processor to perform an operation of multiplying 2x by 8, wherein x is a predetermined value, and to set, in the at least one lookup table, the quantization step size associated with one of the plurality of quantization index values associated with the lossy coding to a result of the operation.
 12. A method comprising: obtaining a video bitstream, the video bitstream including: a first quantization index value for a coefficient of a coded image; an offset value; a quantization step size corresponds to the first quantization index value; a second quantization index value for another coefficient of the coded image, the second quantization index value being based on both (1) the first quantization index value and (2) the offset value and being greater than or equal to a predetermined threshold value; and a mode indicating whether the coded image is to be decoded in a lossy mode or a lossless mode, the mode being determined based on (1) whether the first quantization index value is equal to a quantization index value associated with lossless coding, and (2) whether the offset value is less than or equal to the quantization index value associated with the lossless coding, wherein the method further comprises decoding the video bitstream in the lossy mode or the lossless mode using the quantization step size.
 13. The method of claim 12, further comprising: obtaining the second quantization index value for the another coefficient of the coded image by combining the first quantization index value and the offset value to obtain a combined value, and modifying, based on the combined value being less than a predetermined minimum value, the combined value to be the predetermined minimum value as the second quantization index value.
 14. The method of claim 12, wherein the quantization index value associated with the lossless coding is a positive integer value greater than
 0. 15. The method of claim 13, further comprising: setting the predetermined minimum value to a value different from the quantization index value associated with the lossless coding, based on determining that the first quantization index value is not equal to the quantization index value associated with the lossless coding, or based on determining that the offset value is greater than the quantization index value associated with the lossless coding.
 16. The method of claim 13, wherein the quantization index value associated with the lossless coding is a value different from
 0. 17. The method of claim 12, further comprising obtaining the quantization step size that corresponds to the second quantization index value by using at least one lookup table that indicates a correspondence between a plurality of quantization index values and a plurality of quantization step sizes; and setting, in the at least one lookup table, a quantization step size associated with the quantization index value associated with the lossless coding.
 18. The method of claim 12, wherein obtaining the quantization step size that corresponds to the second quantization index value by using at least one lookup table that indicates a correspondence between a plurality of quantization index values and a plurality of quantization step sizes; and setting, in the at least one lookup table, a quantization step size associated with one of the plurality of quantization index values associated with lossy coding.
 19. The method of claim 18, further comprising: performing an operation of multiplying 2x by 8, wherein x is a predetermined value, and setting, in the at least one lookup table, the quantization step size associated with the one of the plurality of quantization index values associated with the lossy coding to a result of the operation.
 20. A non-transitory computer-readable medium storing computer instructions that are configured to, when executed by at least one processor, cause the at least one processor to: obtain a video bitstream, the video bitstream including: a first quantization index value for a coefficient of a coded image; an offset value; a quantization step size corresponds to the first quantization index value; a second quantization index value for another coefficient of the coded image, the second quantization index value being based on both (1) the first quantization index value and (2) the offset value and being greater than or equal to a predetermined threshold value; and a mode indicating whether the coded image is to be decoded in a lossy mode or a lossless mode, the mode being determined based on (1) whether the first quantization index value is equal to a quantization index value associated with lossless coding, and (2) whether the offset value is less than or equal to the quantization index value associated with the lossless coding, wherein computer instructions are further configured to cause the at least one processor to decode the video bitstream in the lossy mode or the lossless mode using the quantization step size. 